<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<!-- <ul class="nav nav-tabs">
			<li class="active"><a href="{:url('Finance/index')}">品项列表</a></li>
			<li><a href="{:url('Goods/add')}">新增品项</a></li>
		</ul> -->
		<form class="well form-inline margin-top-20" method="post" action="{:url('Single/slist')}">
		店铺:
        <select class="form-control" name="storeid" style="width: 140px;">
            <option value='0'>全部</option>
            <foreach name="store_list" item="v">
            <option value='{$v.id}'>{$v.store_name}</option>
            </foreach>
        </select> &nbsp;&nbsp; 
         数量排行：
        <select class="form-control" name="norder" style="width:140px;">
        	<option >请选择</option>
            <option value='1'>低到高</option>            
            <option value='2'>高到低</option>
        </select> &nbsp;&nbsp;
        金额排行：
        <select class="form-control" name="morder" style="width: 140px;">
        	<option >请选择</option>
            <option value='1'>低到高</option>            
            <option value='2'>高到低</option>
        </select> &nbsp;&nbsp;                               
           时间:
        <input type="text" class="form-control js-bootstrap-datetime" name="start_time" id="start_time" value="{$start_time|default=''}" style="width: 140px;" autocomplete="off">-
        <input type="text" class="form-control js-bootstrap-datetime" name="end_time"   id="end_time" value="{$end_time|default=''}" style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;         
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('Single/slist')}">清空</a>
        <!-- <a title="数据导出" onclick="exportdata()" id="export" class="btn btn-success" style="margin-left: 10px;">数据导出</a> -->
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="40">ID</th>
					<th align="left">店铺</th>
					<th align="left">商品</th>
					<th align="left">数量</th>
					<th align="left">总额</th>
					<th align="left">类型</th>					
					<th align="left">生成时间</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{:get_store_data($vo['storeid'],'store_name')}</td>
					<td>{:get_good_data($vo['gid'],'g_goodsname')}</td><!-- 店铺 -->
					<td>{$vo.num}</td>
					<td>{$vo.money}</td>
					<td>{$vo.type|get_statis_type}</td>
					<td>{$vo.ctime|time_format}</td>					
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>	
	<script>
function exportdata()
{
	var orderNo=$("#orderNo").val();
	var cardid=$("#cardid").val();
	var starttime=$("#start_time").val();
	var endtime=$("#end_time").val();
	//location="{:url('Order/importData',array('orderNo'=>"+orderNo+",'cardid'=>"+cardid+",'starttime'=>"+starttime+",'endtime'=>"+endtime+"))}";			
	//location="./importData/orderNo/"+orderNo+"/cardid/"+cardid+"/starttime/"+starttime+"/endtime/"+endtime;
	location="./importData?orderNo="+orderNo+"&cardid="+cardid+"&starttime="+starttime+"&endtime="+endtime;

}
</script>  
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>